package com.meituan.catering.management.product.dao.model.request;

import com.meituan.catering.management.product.api.http.model.request.SearchProductHttpRequest;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.LinkedList;
import java.util.List;

import static java.lang.Boolean.FALSE;

/**
 * 搜索商品的查询条件
 */
@Data
public class SearchProductDataRequest {

    private Integer pageIndex = 1;

    private Integer pageSize = 10;

    private String name;

    private String unitOfMeasure;

    private Boolean enabled;

    private BigDecimal from;

    private BigDecimal to;

    private List<SortField> sortFields = new LinkedList<>();

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SortField {

        private String field;

        private String asc;

    }
}
